import pytest
import requests
from  send.Send import Send
from utils.read_yaml import  read_yaml

class Test_Change_money:
    @pytest.mark.parametrize(  "args"  ,  read_yaml(r"C:\Program Files\pyxiangmu\jiekoutest\case\data\applyloan.yaml")   )
    def test_applyloan (self,args):

        session = requests.session()

        send = Send()

        result = send.send_applyLoan(session, args["amount"], args["term"], args["rate"])

        assert result["code"] == 200 and result["body"]["code"] == args["exp"]